<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%> 
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" type="text/css" href="../lib/layui/css/layui.css"/>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script type="text/javascript" src="../js/jquery-1.12.4.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    
  </head>
  
  <body>
   
    <div class="baoanxinxi">
    	<span class="layui-btn layui-btn-normal layui-btn-mini" onclick="x_admin_show('保单','insurance_policy.html?reportInfoId=${reportInfo.reportNo}')" style="width: 120px;">保单信息</span>
    	<span  class="layui-btn layui-btn-normal layui-btn-mini"  style="width: 120px;" id="audit">一键核查</span>
    	
    	
				
			
					
						<table  class="layui-table"  lay-even lay-skin="row" lay-size="lg">
							<tr ><td colspan="6"width="900px"><h1 align="center" >报案受理信息</h1></td></tr>
							
							<tr>
								<td width="100px" align="center"> 报案号：</td>
								<td  >${reportInfo.reportNo}</td>
							
								<td width="100px" align="center" > 报案人：</td>
								<td >${reportInfo.reportName}</td>
								<td width="100px" align="center"> 报案人电话：</td>
								<td >${reportInfo.reporTel}</td>
							</tr>
							<tr>
								<td width="100px" align="center"> 驾驶人姓名：</td>
								<td >${reportInfo.driverName}</td>
								<td width="100px" align="center" > 驾驶人电话：</td>
								<td >${reportInfo.driverTel}</td>
								<td  width="100px" align="center"> 出险时间：</td>
								<td ><fmt:formatDate value="${reportInfo.dangerTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
							</tr>
						
							<tr>
								<td width="100px"align="center"> 出险地点：</td>
								<td colspan="5" width="750px">${reportInfo.dangerAddress}
								</td>
							</tr>

							<tr>
								<td width="100px" align="center"> 出险原因：</td>
								<td colspan="5" width="750px">${reportInfo.dangerReason}</td>
							</tr>
							<tr>
								<td  width="100px"  align="center"> 损失类型：</td>
								<td colspan="5" width="750px">
								
								${reportInfo.num1}
								
								</td>
							</tr>
							
							<tr>
								<td  width="100px"align="center" > 出险区域：</td>
								<td colspan="5" width="750px">
								${reportInfo.num2}
									</tr>
							<tr>
								<td  width="100px" align="center"> 接案人：</td>
								<td colspan="2" width="300px">${reportInfo.serviceName}</td>
								<td  width="100px" align="center"> 接案时间：</td>
								<td colspan="2" width="300px"><fmt:formatDate value="${reportInfo.reportTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
							</tr>
						</table>


				</div>
			</div>
		</div>
		</div>
    	
    </div>
    
     <div class="chakanxinxi">
    	 <span class="layui-btn layui-btn-normal layui-btn-mini" onclick="show_msg(this)" style="width: 120px;">查勘信息</span>
    	<div hidden="hidden" >
    	<table class="layui-table"  lay-even lay-skin="row" lay-size="lg">
			<tr>
				<td align="center" style="width: 100px;"> 报案人：</td>
				<td colspan="2">${reportInfo.driverName}</td>
				<td align="center" style="width: 100px;"> 出险驾驶员：</td>
				<td colspan="2">${surveyInfo.driverName}</td>
			</tr>
			<tr>
				<td align="center" style="width: 100px;"> 准驾车型：</td>
				<td colspan="2">
					${surveyInfo.carType}
				</td>
				<td align="center"style="width: 100px;"> 驾驶员电话：</td>
				<td colspan="2">${surveyInfo.driverTel}</td>
			</tr>
			<tr>
				<td align="center"> 道路信息：</td>
				<td colspan="5">
					${surveyInfo.roadInfo}
				</td>
			</tr>
			<tr>
			<!--  隐藏  保单赔偿上限 -->
				<td hidden="hidden" class="compensateAmount">${policy.compensateAmount}</td>
				<!--  隐藏  退档意见 -->
				<td hidden="hidden" class="tdmsg"></td>
				<td align="center"> 出险经过：</td>
				<td colspan="5">
					${surveyInfo.dangerThrough}
				</td>
			</tr>
			<tr>
				<td align="center"> 查勘意见：</td>
				<td colspan="5">
				${surveyInfo.surveyOpinion}
				</td>
			</tr>
			<!--多图上传-->
			<tr>
				<td align="center"> 现场照片：</td>
				<td colspan="5" style="position: relative;">
				
					<img src='${surveyInfo.imgOne}' id="img1"/>
			
					<img src='${surveyInfo.imgTwo}' id="img2"/>
					
					<img src='${surveyInfo.imgThree}' id="img3"/>
				</td>
			</tr>
			<tr>
				<td style="width: 100px;"align="center"> 查勘员：</td>
				<td style="width: 100px;">${reportInfo.surveyorsName}</td>
				<td style="width: 100px;"align="center">
				查勘机构：
				<td style="width: 100px;">${reportInfo.companyName}</td>
				<td style="width: 100px;"align="center"> 查勘时间：</td>
				<td style="width: 100px;">
				<fmt:formatDate value="${surveyInfo.surveyTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
			</tr>
		</table>
    	
    	
    	</div>
    
    <c:if test="${not empty requestScope.carA}">
    <div class="userdingsun">
    	 <span class="layui-btn layui-btn-normal layui-btn-mini" onclick="show_msg(this)" style="width: 120px;">本车定损信息</span>
    	<div hidden="hidden">
    	<table class="layui-table"  lay-even lay-skin="row" lay-size="lg">
    	
    	
			<tr>
				<td style="width: 100px;"align="center"> 修理厂名：</td>
				<td style="width: 100px;">${repairShopA}</td>
				<td style="width: 100px;"align="center"> 车主：</td>
				<td style="width: 100px;">${carA.policyHolder}</td>
				<td style="width: 100px;"align="center"> 车型：</td>
				<td style="width: 100px;">${surveyInfo.carType}</td>
			</tr>
			<tr>
				<td style="width: 100px;"align="center"> 车牌：</td>
				<td style="width: 100px;">${carA.carNo}</td>
				<td style="width: 100px;"align="center"> 发动机号：</td>
				<td style="width: 100px;">${carA.engineNo}</td>
				<td style="width: 100px;"align="center"> 车架号：</td>
				<td style="width: 100px;">${carA.chassisNo}</td>
			</tr>
				<c:if test="${not empty requestScope.carAList}">
    	<c:forEach var="listA" items="${carAList}">
    	<tr>
			<td style="width: 100px;"align="center"> 配件名：</td>
				<td style="width: 100px;">${listA.partsName}</td>
				<td style="width: 100px;"align="center"> 报价：</td>
				<td style="width: 100px;" >${listA.lossFee*listA.num3}</td>
				<td style="width: 100px;"align="center"> 系统价：</td>
				<td style="width: 100px;" >${listA.partsPrice*listA.num3}
				</td>
				</tr>
    	
    	</c:forEach>
    	
    	</c:if>
			
				
			
			
			<tr>
				<td align="center" > 本车定损金额：</td>
				<td class="aaa">${price.priceA}</td>
				<td align="center"> 本车核损金额：</td>
				<td class="aaaa">${price.priceAA}</td>
				<td align="center"> 报损人：</td>
				<td >${reportInfo.surveyorsName}</td>
			</tr>
			<tr>
				<td align="center"> 报损意见：</td>
				<td colspan="5">${lossOpinionA}</td>
				
			</tr>
			
		</table>
    	
    	</div>
    	</c:if>
    	<c:if test="${not empty requestScope.carB}">
    <div class="otherdingsun">
    	 <span class="layui-btn layui-btn-normal layui-btn-mini" onclick="show_msg(this)"style="width: 120px;">三车定损信息</span>
    	<div hidden="hidden">
    	<table class="layui-table"  lay-even lay-skin="row" lay-size="lg">
			<tr>
				<td style="width: 100px;"align="center"> 修理厂名：</td>
				<td style="width: 100px;">${repairShopB}</td>
				<td style="width: 100px;"align="center"> 车主：</td>
				<td style="width: 100px;">${carB.carOwner}</td>
				<td style="width: 100px;"align="center"> 车型：</td>
				<td style="width: 100px;">${carB.carModel}</td>
			</tr>
			<tr>
				<td style="width: 100px;"align="center"> 车牌：</td>
				<td style="width: 100px;">${carB.carNo}</td>
				<td style="width: 100px;"align="center"> 发动机号：</td>
				<td style="width: 100px;">${carB.engineNo}</td>
				<td style="width: 100px;"align="center"> 车架号：</td>
				<td style="width: 100px;">${carB.chassisNo}</td>
			</tr>
			
			<c:if test="${not empty requestScope.carBList}">
			
    	<c:forEach var="listB" items="${carBList}">
    	<tr>
				<td style="width: 100px;"align="center"> 配件名：</td>
				<td style="width: 100px;">${listB.partsName}</td>
				<td style="width: 100px;"align="center"> 报价：</td>
				<td style="width: 100px;" >${listB.lossFee*listB.num3}</td>
				<td style="width: 100px;"align="center"> 系统价：</td>
				<td style="width: 100px;">${listB.partsPrice*listB.num3}</td>
			</tr>
    	</c:forEach>
    	</c:if>
			
			
			<tr>
				<td align="center"> 本车定损金额：</td>
				<td class="bbb">${price.priceB}</td>
				<td align="center"> 本车核损金额：</td>
				<td class="bbbb">${price.priceBB}</td>
				<td align="center"> 报损人：</td>
				<td >${reportInfo.surveyorsName}</td>
			</tr>
			<tr>
				<td align="center"> 报损意见：</td>
				<td colspan="5">${lossOpinionB}</td>
				
			</tr>
			
		</table>
    	
    	</div>
    	</c:if>
    	<c:if test="${not empty requestScope.hurtInfo}">
    	<div class="otherdingsun">
    	 <span class="layui-btn layui-btn-normal layui-btn-mini" onclick="show_msg(this)"style="width: 120px;">人员伤亡信息</span>
    	<div hidden="hidden">
    	<table class="layui-table"  lay-even lay-skin="row" lay-size="lg">
    	
			<tr>
				<td style="width: 100px;"align="center"> 姓名：</td>
				<td style="width: 100px;">${hurtInfo.injuredName}</td>
				<td style="width: 100px;"align="center"> 性别：</td>
				<td style="width: 100px;">${hurtInfo.gender}</td>
				<td style="width: 100px;"align="center"> 年龄：</td>
				<td style="width: 100px;">${hurtInfo.age}</td>
			</tr>
			<tr>
				<td style="width: 100px;"align="center"> 伤亡情况：</td>
				<td style="width: 100px;"class="die">${hurtInfo.censusRegister}</td>
				<td style="width: 100px;"align="center"> 联系电话：</td>
				<td style="width: 100px;">${hurtInfo.phone}</td>
				<td style="width: 100px;"align="center"> 就诊医院：</td>
				<td style="width: 100px;">${hurtInfo.hospital}</td>
			</tr>
			<tr>
				<td style="width: 100px;"align="center"> 主治医师：</td>
				<td style="width: 100px;">${hurtInfo.doctor}</td>
				<td style="width: 100px;"align="center"> 科室：</td>
				<td style="width: 100px;">${hurtInfo.office}</td>
				<td style="width: 100px;"align="center"> 事故车牌号：</td>
				<td style="width: 100px;">${hurtInfo.carNo}</td>
			</tr>
			
			<tr>
				<td align="center"> 入院时间：</td>
				<td colspan="2"><fmt:formatDate value="${hurtInfo.cureTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td align="center"> 报损时间：</td>
				<td colspan="2"><fmt:formatDate value="${hurtInfo.lossTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				
			</tr>
			<tr>
			<td align="center"> 医疗报价：</td>
				<td colspan="2" class="lossFee">${hurtInfo.lossFee}</td>
				
				
				
				<td align="center"> 报损人：</td>
				<td colspan="2">${hurtInfo.personnelName}</td>
			</tr>
			<tr>
			<td align="center"> 主要诊断：</td>
				<td colspan="5">${hurtInfo.illnessState}</td>
			</tr>
			
		</table>
    	
    	
    	</div>
    	</c:if>
    	<c:if test="${not empty requestScope.dataAcquisitionService}">
     <div class="ziliao">
    	 <span class="layui-btn layui-btn-normal layui-btn-mini" onclick="show_msg(this)" style="width: 120px;">资料信息</span>
    	<div hidden="hidden">
    	<table class="layui-table"  lay-even lay-skin="row" lay-size="lg">
    	
			<tr>
				<td align="center" colspan="2"> 交通事故损害赔偿调解书：</td>
				<td style="width: 150px;">${dataAcquisitionService.reparationMediation==1?"有":"无"}</td>
				<td align="center"colspan="2"> 营业执照或身份证复印件：</td>
				<td style="width: 150px;">${dataAcquisitionService.insurerCertificate==1?"有":"无"}</td>
				
			</tr>
			<tr>
			<td  align="center"> 车辆购置附加费原件：</td>
				<td style="width: 150px;">${dataAcquisitionService.additionalPrices==1?"有":"无"}</td>
			<td  align="center"> 保单原件：</td>
				<td style="width: 150px;">${dataAcquisitionService.insurancePolicyId==1?"有":"无"}</td>
				<td align="center"> 盗抢车辆为侦破证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.touqiekanpoCertificate==1?"有":"无"}</td>
				
				
			</tr>
			<tr>
			<td style="width: 150px;"align="center"> 驾驶证：</td>
				<td style="width: 150px;">${dataAcquisitionService.driverLicense==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 病历证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.illnessCertificate==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 机动车登记证书原件：</td>
				<td style="width: 150px;">${dataAcquisitionService.carCertificate==1?"有":"无"}</td>
				
			</tr>
			
			<tr>
				<td style="width: 150px;"align="center"> 火灾证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.fireCertificate==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 索赔申请书：</td>
				<td style="width: 150px;">${dataAcquisitionService.claim==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 三者的赔偿收据：</td>
				<td style="width: 150px;">${dataAcquisitionService.thirdCompensation==1?"有":"无"}</td>
			</tr>
			<tr>
				<td style="width: 150px;"align="center"> 施救费用收据：</td>
				<td style="width: 150px;">${dataAcquisitionService.salvagePrices==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 盗抢车辆封档证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.touqiefdCertificate==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 医疗费用单：</td>
				<td style="width: 150px;">${dataAcquisitionService.medicalPrices==1?"有":"无"}</td>
			</tr>
			<tr>
				<td style="width: 150px;"align="center"> 死亡证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.dieCertificate==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 购车发票：</td>
				<td style="width: 150px;">${dataAcquisitionService.autobytelInvoice==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 养路费停缴证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.yanglufei==1?"有":"无"}</td>
			</tr>
			<tr>
				<td style="width: 150px;"align="center"> 存车场发票：</td>
				<td style="width: 150px;">${dataAcquisitionService.cunchechang==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 驾驶员会员证复印件：</td>
				<td style="width: 150px;">${dataAcquisitionService.driverVip==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 暴雨暴风证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.rainstormCertificate==1?"有":"无"}</td>
			</tr>
			<tr>
				<td style="width: 150px;"align="center"> 事故证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.accidentCertificate==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 损失清单：</td>
				<td style="width: 150px;">${dataAcquisitionService.lossList==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 行驶证原件：</td>
				<td style="width: 150px;">${dataAcquisitionService.travelLicenseA==1?"有":"无"}</td>
			</tr>
			<tr>
				<td style="width: 150px;"align="center"> 赔款收据：</td>
				<td style="width: 150px;">${dataAcquisitionService.paymentRecript==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 交通事故评残证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.disabilityCertificate==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 误工证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.wugongCertificate==1?"有":"无"}</td>
			</tr>
			<tr>
				<td style="width: 150px;"align="center"> 垫付申请：</td>
				<td style="width: 150px;">${dataAcquisitionService.carKey==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 车辆丢失登报证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.lossVehiclesCertificate==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 权益转让书：</td>
				<td style="width: 150px;">${dataAcquisitionService.assignment==1?"有":"无"}</td>
			</tr>
			<tr>
				<td style="width: 150px;"align="center"> 行驶证复件：</td>
				<td style="width: 150px;">${dataAcquisitionService.travelLicenseB==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 修车发票：</td>
				<td style="width: 150px;">${dataAcquisitionService.repairInvoice==1?"有":"无"}</td>
				<td style="width: 150px;"align="center"> 抚养证明：</td>
				<td style="width: 150px;">${dataAcquisitionService.maintenanceCertificate==1?"有":"无"}</td>
				
			</tr>
			
			
		</table>
    	
    	</div>
          
         </c:if> 
     
    <script type="text/javascript">
    $(function(){
    $("#audit").click(function(){
    	//资料收集
    	//交通事故损害赔偿调解书
    	var rm=${dataAcquisitionService.reparationMediation};
    	//营业执照或身份证复印件
    	var ic=${dataAcquisitionService.insurerCertificate};
    	//保单原件
    	var ip=${dataAcquisitionService.insurancePolicyId};
    	//驾驶证
    	var dl=${dataAcquisitionService.driverLicense};
    	//病历证明
    	var ic=${dataAcquisitionService.illnessCertificate};
    	//医疗费用单
    	var mp=${dataAcquisitionService.medicalPrices};
    	//垫付申请
    	var ck=${dataAcquisitionService.carKey};
    	//机动车登记证书原件
    	var cc=${dataAcquisitionService.carCertificate};
    	//索赔申请书
    	var claim=${dataAcquisitionService.claim};
    	//三者的赔偿收据
    	var tc=${dataAcquisitionService.thirdCompensation};
    	//施救费用收据
    	var sp=${dataAcquisitionService.salvagePrices};
    	//死亡证明
    	var dcf=${dataAcquisitionService.dieCertificate};
    	//购车发票
    	var ai=${dataAcquisitionService.autobytelInvoice};
    	//事故证明
    	var ac=${dataAcquisitionService.accidentCertificate};
    	//损失清单
    	var ll=${dataAcquisitionService.lossList};
    	//行驶证原件
    	var ta=${dataAcquisitionService.travelLicenseA};
    	//赔款收据
    	var pr=${dataAcquisitionService.paymentRecript};
    	//交通事故评残证明
    	var dc=${dataAcquisitionService.disabilityCertificate};
    	//行驶证复件
    	var tb=${dataAcquisitionService.travelLicenseB};
    	//修车发票
    	var ri=${dataAcquisitionService.repairInvoice};
    	
    	//人伤
    	var hi=${hurtInfo!=null};
    	//死亡
    	var die=$(".die").html();
    	//三车
    	var cb=${carB!=null}
    	//三车
    	var ca=${carA!=null}
    	
    	
    //本车定损及核定
    var aaa=$(".aaa").html();
    var aaaa=$(".aaaa").html();
    //三车定损及核定
    var bbb=$(".bbb").html();
    var bbbb=$(".bbbb").html();
    //人损医疗费
    var ccc=$(".lossFee").html();
    //保单赔偿金上限
    var dd=$(".compensateAmount").html()
    //判空赋值
    if(!bbb){
    	bbb=0;
    }
    if(!ccc){
    	ccc=0;
    }
    if(!bbbb){
    	bbbb=0;
    }
    //最终核赔金额
    var zzz=0;
    if(aaa-aaaa>100){
    	var msg="本车定损过高";
    	$(".tdmsg").html("")
    	$(".tdmsg").html("本车定损过高")
    alert(msg)
    $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
    
    }else if(bbb-bbbb>100){
    	var msg="三车定损过高";
    	$(".tdmsg").html("")
    	$(".tdmsg").html("三车定损过高")
    	 alert(msg)
    	 $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
    }else if(hi){
    	if (die=='死亡'&&(dcf==0||ip==0||ic==0||ic==0||mp==0||dl==0||claim==0||ac==0||(tb==0||ta==0))) {
    		var msg="资料缺少";
        	$(".tdmsg").html("")
        	$(".tdmsg").html("资料缺少")
        	 alert(msg)
        	 $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
        
		} else if(ip==0||ic==0||ic==0||mp==0||dl==0||claim==0||ac==0||(tb==0||ta==0)){
			var msg="资料缺少";
        	$(".tdmsg").html("")
        	$(".tdmsg").html("资料缺少")
        	 alert(msg)
        	 $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
        	
		}else if(cb&&(ip==0||ic==0||ri==0||dl==0||claim==0||ac==0||(tb==0||ta==0))){
	    	
	    		var msg="资料缺少";
	        	$(".tdmsg").html("")
	        	$(".tdmsg").html("资料缺少")
	        	 alert(msg)
	        	 $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
			
	    	
	    }else if(ca&&(ip==0||ic==0||ri==0||dl==0||claim==0||ac==0||(tb==0||ta==0))){
	    	
	    		var msg="资料缺少";
	        	$(".tdmsg").html("")
	        	$(".tdmsg").html("资料缺少")
	        	 alert(msg)
	        	 $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
			
	    	
	      }else{
	    	  if (aaa*1>aaaa*1&&bbb*1>bbbb*1) {
	      		zzz=aaaa*1+bbbb*1+ccc*1;
	      		if (zzz<dd) {
	      			alert("最终定损金额为:"+zzz+"元")
	          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
	  			}else{
	  				alert("最终定损金额为:"+dd+"元")
	  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
	  			}
	      		
	  		}else if (aaa*1>aaaa*1&&bbb*1<bbbb*1) {
	  			zzz=aaaa*1+bbb*1+ccc*1;
	  			if (zzz<dd) {
	      			alert("最终定损金额为:"+zzz+"元")
	          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
	  			}else{
	  				alert("最终定损金额为:"+dd+"元")
	  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
	  			}
	  		}else if(bbb*1>bbbb*1&&aaa*1<aaaa*1){
	  			zzz=aaa*1+bbbb*1+ccc*1;
	  			if (zzz<dd) {
	      			alert("最终定损金额为:"+zzz+"元")
	          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
	  			}else{
	  				alert("最终定损金额为:"+dd+"元")
	  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
	  			}
	  		}else{
	  			zzz=aaa*1+bbb*1+ccc*1;
	  			if (zzz<dd) {
	      			alert("最终定损金额为:"+zzz+"元")
	          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
	  			}else{
	  				alert("最终定损金额为:"+dd+"元")
	  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
	  			}
	  			}
	      		
	  		
	    	  
	    	  
	    	  
	      }
    	
    	
    }else if(cb){
    	if (ip==0||ic==0||ri==0||dl==0||claim==0||ac==0||(tb==0||ta==0)) {
    		var msg="资料缺少";
        	$(".tdmsg").html("")
        	$(".tdmsg").html("资料缺少")
        	 alert(msg)
        	 $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
		}else if(ca&&(ip==0||ic==0||ri==0||dl==0||claim==0||ac==0||(tb==0||ta==0))){
	    	
	    		var msg="资料缺少";
	        	$(".tdmsg").html("")
	        	$(".tdmsg").html("资料缺少")
	        	 alert(msg)
	        	 $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
			
	    	
	      }else{
	    	  if (aaa*1>aaaa*1&&bbb*1>bbbb*1) {
		      		zzz=aaaa*1+bbbb*1+ccc*1;
		      		if (zzz<dd) {
		      			alert("最终定损金额为:"+zzz+"元")
		          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}else{
		  				alert("最终定损金额为:"+dd+"元")
		  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}
		      		
		  		}else if (aaa*1>aaaa*1&&bbb*1<bbbb*1) {
		  			zzz=aaaa*1+bbb*1+ccc*1;
		  			if (zzz<dd) {
		      			alert("最终定损金额为:"+zzz+"元")
		          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}else{
		  				alert("最终定损金额为:"+dd+"元")
		  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}
		  			}else if(bbb*1>bbbb*1&&aaa*1<aaaa*1){
		  			zzz=aaa*1+bbbb*1+ccc*1;
		  			if (zzz<dd) {
		      			alert("最终定损金额为:"+zzz+"元")
		          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}else{
		  				alert("最终定损金额为:"+dd+"元")
		  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}
		  			}else{
		  			zzz=aaa*1+bbb*1+ccc*1;
		  			if (zzz<dd) {
		      			alert("最终定损金额为:"+zzz+"元")
		          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}else{
		  				alert("最终定损金额为:"+dd+"元")
		  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}
		  			}
		      		
		  		
		    	  
		    	  
		    	  
		      }
    	
    }else if(ca){
    	if (ip==0||ic==0||ri==0||dl==0||claim==0||ac==0||(tb==0||ta==0)) {
    		var msg="资料缺少";
        	$(".tdmsg").html("")
        	$(".tdmsg").html("资料缺少")
        	 alert(msg)
        	 $("#audit").after("<span id='tuihui' class='layui-btn layui-btn-normal layui-btn-mini'  style='width: 120px;' onclick='tuihui()' hidden='hidden'>退回案件</span>")
		}else{
	    	  if (aaa*1>aaaa*1&&bbb*1>bbbb*1) {
		      		zzz=aaaa*1+bbbb*1+ccc*1;
		      		if (zzz<dd) {
		      			alert("最终定损金额为:"+zzz+"元")
		          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}else{
		  				alert("最终定损金额为:"+dd+"元")
		  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}
		      		
		  		}else if (aaa*1>aaaa*1&&bbb*1<bbbb*1) {
		  			zzz=aaaa*1+bbb*1+ccc*1;
		  			if (zzz<dd) {
		      			alert("最终定损金额为:"+zzz+"元")
		          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}else{
		  				alert("最终定损金额为:"+dd+"元")
		  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}
		  			}else if(bbb*1>bbbb*1&&aaa*1<aaaa*1){
		  			zzz=aaa*1+bbbb*1+ccc*1;
		  			if (zzz<dd) {
		      			alert("最终定损金额为:"+zzz+"元")
		          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}else{
		  				alert("最终定损金额为:"+dd+"元")
		  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}
		  			}else{
		  			zzz=aaa*1+bbb*1+ccc*1;
		  			if (zzz<dd) {
		      			alert("最终定损金额为:"+zzz+"元")
		          		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}else{
		  				alert("最终定损金额为:"+dd+"元")
		  	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
		  			}
		  			}
		      		
		  		
		    	  
		    	  
		    	  
		      }
    	
      }else{
    	if (aaa*1>aaaa*1&&bbb*1>bbbb*1) {
    		zzz=aaaa*1+bbbb*1+ccc*1;
    		if (zzz<dd) {
    			alert("最终定损金额为:"+zzz+"元")
        		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
			}else{
				alert("最终定损金额为:"+dd+"元")
	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
			}
    		
		}else if (aaa*1>aaaa*1&&bbb*1<bbbb*1) {
			zzz=aaaa*1+bbb*1+ccc*1;
			if (zzz<dd) {
    			alert("最终定损金额为:"+zzz+"元")
        		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
			}else{
				alert("最终定损金额为:"+dd+"元")
	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
			}
			}else if(bbb*1>bbbb*1&&aaa*1<aaaa*1){
			zzz=aaa*1+bbbb*1+ccc*1;
			if (zzz<dd) {
    			alert("最终定损金额为:"+zzz+"元")
        		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
			}else{
				alert("最终定损金额为:"+dd+"元")
	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
			}
			}else{
			zzz=aaa*1+bbb*1+ccc*1;
			if (zzz<dd) {
    			alert("最终定损金额为:"+zzz+"元")
        		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+zzz+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
			}else{
				alert("最终定损金额为:"+dd+"元")
	    		$("#audit").after("<span id='tijiao' class='layui-btn layui-btn-normal layui-btn-mini' onclick='tijiao("+dd+")' style='width: 120px;'  hidden='hidden' >提交案件</span>")
			}
			}
    		
		
    	
    }
    
    
    })
   
    
    
    })
    //提交案件方法
     function tijiao(zzz){
    	var id=${reportInfo.reportNo};
    	var time=new Date();
    	var userid=${loginUser.pkUser};
    	
    	$.getJSON(
		"tijiao.do",
    	{"id":id,"zzz":zzz,"time":time,"userid":userid},
    	function(data){
    	if (data==1) {
    		alert("提交成功")
    		x_admin_close()
    		parent.location.reload()
    	} 
    	}
    	)
    }
    //退回案件方法
     function tuihui(){
    	var msg=$(".tdmsg").html()
    	var id=${reportInfo.reportNo};
    	var time=new Date();
    	var userid=${loginUser.pkUser};
    	$.getJSON(
		"tuihui.do",
    	{"id":id,"msg":msg,"time":time,"userid":userid},
    	function(data){
    	if (data==1) {
    		alert("退回成功")
    		x_admin_close()
    		parent.location.reload()
    	} 
    	}
    	)
    }
    
    	function show_msg(e){
    		$(e).next("div").toggle()
    	}
    	
    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();</script>
  </body>

</html>